@import "./common/gc-var";
@import "./common/transition";
@import "./common/mixin";

html, body {
  height: 100%;
  color: $--color-text-primary;
}
//.el-scrollbar__wrap {
//  overflow: auto !important;
//}


//跳转进度条
#nprogress {
  pointer-events:none
}
#nprogress .bar {
  background: $--color-primary;
}
#nprogress .peg {
  -webkit-box-shadow: 0 0 10px $--color-primary,0 0 5px $--color-primary;
  box-shadow: 0 0 10px $--color-primary,0 0 5px $--color-primary;
}
#nprogress .spinner-icon {
  border-top-color: $--color-primary;
  border-left-color: $--color-primary;
}

//布局样式
#app {
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}
/*头部*/

.el-menu--horizontal {
  .el-menu-item {
    &:hover {
      background-color: rgba(0,0,0,.05);
    }
  }
  a {
    display: block;
  }
}
// 登录注册找回密码页面应用
.gc-template__header--logo {
  position: relative;
  z-index: 2;
  float: left;
  line-height: 63px;
  padding: 0 16px;
  // background-color: rgba(0,0,0,.05);
  img {
    max-height: 40px ;
    vertical-align: middle;
  }
}
.line{
  position: relative;
  margin-top: 15px;
  z-index: 2;
  float: left;
  // width: 1px;
  height: 35px;
  // color: #e0e7f1;
  border: 1px solid #e0e7f1;
}

.gc-template__header--h1 {
  position: relative;
  z-index: 2;
  float: left;
  padding: 0 16px;
  color: #333333;
  font-size: 18px;
  line-height: 64px;
  font-weight: 700;
}
.gc-template__header-version {
  font-size: 12px;
  font-weight: normal;
  position: absolute;
  top: -10px;
  right: -24px;
}

/*主体*/
// 空布局样式设置
.gc-template__wrap{
  height: calc(100%);
}
.app-main{
  height: calc(100%);
  // 深色主题下组件空布局底部
  // background-color: $--background-color-base;
  @include common-input-bg($--background-color-base);
  .router-tab{
    height: calc(100%);
  }
  .router-tab__header {
    display: none;
  }
  .router-tab__container{
    overflow-x: hidden;
    overflow-y: auto;
    width: 100%;
    max-height: calc(100%);
    height: calc(100%);
  }
  .app-container{
    max-height: calc(100%);
    background-color: $--background-color-base;
    &.app-container-white {
      background-color: #fff;
    }
    .inner-container{
      min-height: calc(100vh - 32px);
    }
  }
}
.app-wrapper {
  @include clearfix;
  position: relative;
  z-index: 1;
  height: 100%;
  width: 100%;
  &.mobile.openSidebar{
    position: fixed;
    top: 0;
  }
  .main-container {
    position: relative;
    //display: flex;
    //flex: auto;
    //flex-direction: column;
    min-height: 100%;
    // transition: all .28s;
    //margin-left: $sideBarWidth;
    //position: relative;
    overflow: hidden;
    margin-left: $gc-sideBar-width;
  }
  .app-main {
    /*50 = navbar  */
    min-height: calc(100vh - 100px);
    width: 100%;
    position: relative;
    overflow: hidden;
    //background-color: #F6F7FB;
    .app-container {
      min-height: calc(100vh - 100px);
      .inner-container {
        min-height: calc(100vh - 148px + 16px);
      }
    }
    .router-tab {
      position: absolute;
      top: 0;
      right: 0;
      bottom: 0;
      left: 0;
    }
    .router-tab-header {
      display: none;
    }
    .router-tab-scroll {
      margin: 5px 30px 0;
      height: 34px;
    }
    .router-tab-item {
      position: relative;
      display: inline-block;
      padding: 0 32px;
      height: 35px;
      line-height: 35px;
      transition: none;
      transform-origin: center;
      border: 0;
      //margin-top: 5px;
    }
    .router-tab-item .tab-icon {
      display: none;
    }
    .router-tab-item.actived,
    .router-tab-item.actived.is-closable {
      padding: 0 32px;
      background: #F6F7FB;
      border: 1px solid #E8E8E8;
      border-top: 2px solid $--color-primary;
      border-bottom: 0;
      transition: none;
      transform-origin: center;
    }
    .router-tab-item.actived,
    .router-tab-item:hover {
      color: #37474F;
      padding: 0 32px;
    }
    .router-tab-item:hover {
      .tab-close {
        display: inline-block;
      }
    }
    .router-tab-item .tab-close {
      transition: none;
      position: absolute;
      top: 4px;
      right: 8px;
      width: 16px;
      height: 16px;
      vertical-align: 2px;
      border-radius: 50%;
      text-align: center;
      transition: all .3s cubic-bezier(.645, .045, .355, 1);
      transform-origin: 100% 50%;
      color: #262626;
      display: none;
    }
    .router-tab-item .tab-close:after,
    .router-tab-item .tab-close:before {
      transition: none !important;
      margin-left: -4px;
    }
    .router-tab .nav-prev,
    .router-tab .nav-next {
      z-index: 2;
      position: absolute;
      height: 40px;
      background: var(--gc-router-tab-bg);
    }
    .router-tab .nav-prev {
      left: 0;
      top: 0;
    }
    .router-tab .nav-next {
      right: 0;
      top: 0;
    }
    .router-tab .nav-prev:hover:after {
      border-right-color: $--color-primary;
    }
    .router-tab .nav-next:hover:after {
      border-left-color: $--color-primary;
    }
    .router-tab-contextmenu .contextmenu-item:active,
    .router-tab-contextmenu .contextmenu-item:hover {
      color: $--color-primary;
    }
  }
  .has-tagsview {
    .app-main {
      min-height: calc(100vh - 100px);

      .app-container {
        min-height: calc(100vh - 140px);
        .inner-container {
          min-height: calc(100vh - 172px);
        }
      }
    }
    .router-tab__header {
      display: block;
    }
  }

  .app-container {
    box-sizing: border-box;
    min-height: 100%;
    //padding: 16px 32px;
    padding: 16px;
    background-color: $--background-color-base;
    &.app-container-white {
      background-color: #fff;
    }
  }
}


//layout/index
.drawer-bg {
  background: #000;
  opacity: 0.3;
  width: 100%;
  top: 0;
  height: 100%;
  position: absolute;
  z-index: 999;
}

//headbar
.el-menu--horizontal .el-menu .el-menu-item.is-active, .el-menu--horizontal .el-menu .el-submenu.is-active>.el-submenu__title {
  color: $--color-primary;
}



//element-ui
// cover some element-ui styles
.el-breadcrumb__inner,
.el-breadcrumb__inner a {
  font-weight: 400 !important;
}

.el-upload {
  input[type="file"] {
    display: none !important;
  }
}

.el-upload__input {
  display: none;
}

// to fixed https://github.com/ElemeFE/element/issues/2461
.el-dialog {
  transform: none;
  left: 0;
  position: relative;
  margin: 0 auto;
}

// refine element ui upload
.upload-container {
  .el-upload {
    width: 100%;

    .el-upload-dragger {
      width: 100%;
      height: 200px;
    }
  }
}

// dropdown
.el-dropdown-menu {
  a {
    display: block
  }
}

// to fix el-date-picker css style
.el-range-separator {
  box-sizing: content-box;
}


// mobile responsive
.mobile {
  .main-container {
    margin-left: 0px;
  }

  .sidebar-container {
    // transition: transform .28s;
    width: $gc-sideBar-width !important;
  }

  &.hideSidebar {
    .sidebar-container {
      pointer-events: none;
      transition-duration: 0.3s;
      transform: translate3d(-$gc-sideBar-width, 0, 0);
    }
  }
}

.withoutAnimation {

  .main-container,
  .sidebar-container {
    transition: none;
  }
}

// when menu collapsed
.el-menu--vertical {

  .el-menu-item, .el-submenu__title {
    height: 40px !important;
    line-height: 40px !important;
  }

  &>.el-menu {
    .svg-icon {
      margin-right: 12px;
    }
  }
}


/* 模板页面 */
.gc-layout-row {
  //margin-top: 24px;
  & > .el-col {
    margin-bottom: 16px;
  }
}
.gc-layout-row-last{
  & > .el-col {
    margin-bottom: 0;
  }
}

//portal.vue
.gc-simple-count {
  margin-bottom: 16px;
  .el-col {
    text-align: center;
  }
  .gc-simple-count__item {
    display: inline-block;
    text-align: left;
    line-height: 1;
    color: $--color-text-secondary;
    p:first-child {
      margin-bottom: 12px;
    }
    .gc-simple-count__num {
      font-size: 36px;
      color: #292929;
    }
  }
}

.gc-trend-list {
  .gc-trend-item {
    position: relative;
    display: inline-block;
    margin: 16px 0;
    text-align: left;
    .gc-trend-item__icon {
      position: absolute;
      top: 50%;
      left: 0;
      width: 48px;
      height: 48px;
      text-align: center;
      line-height: 48px;
      transform: translateY(-50%);
      border-radius: 50%;
      &.gc-trend-item__icon--1 {
        background-color: nth($chartsColors, 1);
      }
      &.gc-trend-item__icon--2 {
        background-color: nth($chartsColors, 2);
      }
      &.gc-trend-item__icon--3 {
        background-color: nth($chartsColors, 3);
      }
      &.gc-trend-item__icon--4 {
        background-color: nth($chartsColors, 4);
      }
      &.gc-trend-item__icon--5 {
        background-color: nth($chartsColors, 5);
      }
      &.gc-trend-item__icon--6 {
        background-color: nth($chartsColors, 6);
      }
      &.gc-trend-item__icon--7 {
        background-color: nth($chartsColors, 7);
      }
      &.gc-trend-item__icon--8 {
        background-color: nth($chartsColors, 8);
      }
    }
    .gc-trend-item__cont {
      margin-left: 64px;
      span {
        margin-right: 16px;
      }
      .gc-trend-item__num {
        margin-right: 0;
        font-size: 36px;
        color: #292929;
      }
      .gc-trend-item--up {
        color: $--color-success;
      }
      .gc-trend-item--down {
        color: $--color-danger;
      }
    }
  }
}

.gc-charts-box {
  height: 100%;
  width: 100%;
}


//secondary
.gc-color-card {
  padding: 16px;
  text-align: center;
  color: #fff;
  line-height: 40px;
  font-size: 18px;
  .gc-color-card__count {
    font-size: 36px;
    font-weight: 700;
  }
}
.gc-info-table {
  table-layout: fixed;
  width: 100%;
  border: 1px solid $--border-color-base;
  td {
    padding: 8px;
    line-height: 24px;
    border: 1px solid $--border-color-base;
    &:nth-child(odd) {
      width: 100px;
      background-color: #FAFAFA;
      text-align: right;
    }
  }
}
// CKEditor造成全局滚动条修复
.cke_screen_reader_only {
  display: none;
}
